package com.xq.model;

import java.util.ArrayList;
import java.util.List;

import com.google.common.base.Joiner;

public class XiaoQu extends BaseModel<XiaoQu> {

	public final static String TABLE_NAME = "xq_xiaoqu";
	
	public static final XiaoQu dao = new XiaoQu();
	
	public XiaoQu findByName(String name)
	{
		return findFirst("select * from xq_xiaoqu where name = ? limit 1", name);
	}
	
	public List<XiaoQu> findByLBSIdList(List<Long> lbsIdList)
    {
    	if (lbsIdList == null || lbsIdList.isEmpty())
    	{
    		return new ArrayList<XiaoQu>();
    	}
    	return find("select * from " + TABLE_NAME + " where lbsId in (" + Joiner.on(",").join(lbsIdList) + ")");
    }
}
